package org.example.chengyu.entity;

public class Shili {
    private String text = null;
    private String jiegou = null;

    public void setText(String text) {
        this.text = text;
    }

    public void setJiegou(String jiegou) {
        this.jiegou = jiegou;
    }

    public String toString(){
        StringBuilder sb = new StringBuilder();
        sb.append("<示例>");
        if(text!=null && !"".equals(text)){
            sb.append("<例句>").append(text).append("</例句>");
        }
        if(jiegou!=null && !"".equals(jiegou)){
            sb.append("<用法>").append(jiegou).append("</用法>");
        }
        sb.append("</示例>");
        return sb.toString();
    }
}
